package com.dome.backtemplate.verification;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.NotBlank;
import java.lang.annotation.*;

/**
 * @author 小乌龟 敏感词判定 string
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@NotBlank(message = "内容不可为空")
@Constraint(validatedBy = {IsSensitiveWordValidation.class})
public @interface IsSensitiveWord {
    String message() default "含有敏感词不可提交";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}